import type { RouteRecordRaw } from 'vue-router';

import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    meta: {
      icon: 'lucide:coins',
      order: 20,
      title: '业务管理',
    },
    name: 'Business',
    path: '/business',
    children: [
      {
        name: 'TenantManagement',
        path: '/tenant-management',
        component: () => import('#/views/business/tenant-management/index.vue'),
        meta: {
          icon: 'lucide:building-2',
          title: $t('page.system.tenantManagement'),
        },
      },
      {
        name: 'TenantTaskList',
        path: '/tenant-management/:tenantId/tasks',
        component: () => import('#/views/business/tenant-task/index.vue'),
        meta: {
          hideInMenu: true,
          title: '租户任务',
          currentActiveMenu: '/tenant-management',
        },
      },
      {
        name: 'TenantTaskApplications',
        path: '/tenant-management/:tenantId/tasks/:taskId/applications',
        component: () => import('#/views/business/tenant-task/applications.vue'),
        meta: {
          hideInMenu: true,
          title: '任务报名',
          currentActiveMenu: '/tenant-management',
        },
      },
      {
        name: 'BusinessFreelancer',
        path: '/freelancer-management',
        component: () => import('#/views/business/freelancer/index.vue'),
        meta: {
          icon: 'lucide:users',
          title: '自由职业者',
        },
      },
    ],
  },
];

export default routes;
